Skip to content

feat: emit automatic skill-load marks [1/3]#391

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
willkill07:wkk_relay-443-core
Jul 10, 2026
Merged

feat: emit automatic skill-load marks [1/3]#391
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
willkill07:wkk_relay-443-core

Conversation

@willkill07

@willkill07 willkill07 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Overview

Implements the shared RELAY-443 runtime behavior for automatic skill-load marks. This is the first commit in a three-PR cumulative stack; all three PRs target upstream main as requested.

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Detects first-class skill tools, complete structured SKILL.md reads, and safe standalone shell readers in the Rust tool lifecycle.
  • Emits eager, tool-parented skill.load marks with minimal payloads, per-call deduplication, and failure-path preservation.
  • Normalizes Claude Code, Codex, and Hermes hook behavior, including inferred slash-command expansion marks.
  • Adds comprehensive positive and rejected-branch coverage outside the src tree.
  • Preserves current upstream observability semantics: ATOF is canonical for marks and ATIF omits point-in-time marks.
  • Contains no documentation changes.

Validation: just test-rust, just test-python, just test-go, just test-node, cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, and uv run pre-commit run --all-files.

Breaking changes: none.

Where should the reviewer start?

Start with crates/core/src/api/skill_load.rs, then review its lifecycle integration in crates/core/src/api/tool.rs and the external test matrix in crates/core/tests/unit/skill_load_tests.rs.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to: RELAY-443

Summary by CodeRabbit

  • New Features
    • Added skill-load (skill.load) mark emission for tool calls, including detected skill names and load sources.
    • Added support for Claude Code UserPromptExpansion, including inferred “skill load” marks and stable event metadata.
    • Preserved skill-load marks through sanitization and tool execution failures.
  • Bug Fixes
    • Improved deduplication and idempotent hook handling; prevented extra skill-load marks when handling is already owned.
  • Documentation
    • Updated Claude Code integration docs to include UserPromptExpansion and clarified the minimum supported version.
    • Enhanced diagnostics from the CLI doctor with a version-bound warning for hook compatibility.

@willkill07 willkill07 requested a review from a team as a code owner July 8, 2026 23:42
@github-actions github-actions Bot added size:XL PR is extra large Feature a new feature lang:rust PR changes/introduces Rust code labels Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 13d83597-637e-4027-902f-4d410dd246a4

📥 Commits

Reviewing files that changed from the base of the PR and between 1f39d6d and 4425d55.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (17)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/doctor.rs
  • crates/cli/src/installer.rs
  • crates/cli/src/session.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/Cargo.toml
  • crates/core/src/api/mod.rs
  • crates/core/src/api/skill_load.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • integrations/coding-agents/claude-code/README.md
  • integrations/coding-agents/claude-code/hooks/hooks.json
📜 Recent review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: CodeRabbit
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (25)
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

When changing the core Rust runtime or Rust-facing API surface, format Rust code with cargo fmt (rustfmt defaults), keep cargo clippy -- -D warnings clean, and satisfy cargo deny check per deny.toml.

**/*.rs: If any Rust code changed, always run just test-rust.
If any Rust code changed, also run cargo fmt --all.
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings.
For Rust changes headed for review, run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings even if relying on pre-commit.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/api/mod.rs
  • crates/core/Cargo.toml
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions in Rust and Python: use snake_case.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,py,js,mjs,cjs,ts,tsx}: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths, and keep errors explicit and binding-appropriate at the wrapper layer.
Keep async behavior on the existing tokio-based model; bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use language-appropriate naming conventions: Rust snake_case, C FFI exports prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Rust, Go, JavaScript, and TypeScript source files using the corresponding // comment form.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
crates/core/src/{api/**/*.rs,api/runtime/**/*.rs,codec/**/*.rs,json.rs}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Implement the new or changed public runtime behavior first in the Rust core, especially under crates/core/src/api/ and related core modules such as crates/core/src/api/runtime/, crates/core/src/codec/, and crates/core/src/json.rs.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/src/api/tool.rs
  • crates/core/src/api/skill_load.rs
{crates/**/src/**/*.rs,python/**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Do not add tests under src; Rust tests belong in crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/src/installer.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/session.rs
  • crates/core/src/api/skill_load.rs
**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*: Format changed files with the language-native formatter before the final lint/test pass.
If dynamic plugin behavior changed, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • integrations/coding-agents/claude-code/hooks/hooks.json
  • crates/core/Cargo.toml
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • integrations/coding-agents/claude-code/README.md
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
crates/{core,adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full validation matrix across Rust, Python, Go, and Node.js.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/Cargo.toml
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If a language surface changed, always run that language's test target even when Rust core did not change.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings,
documentation, integrations, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
skills/       # Published Codex/agent skills for NeMo Relay usage patterns

Prerequisites

Insta...

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • integrations/coding-agents/claude-code/hooks/hooks.json
  • crates/core/Cargo.toml
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/tool.rs
  • crates/cli/src/doctor.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • integrations/coding-agents/claude-code/README.md
  • crates/cli/src/adapters/mod.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/cli/src/session.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/src/api/skill_load.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/tests/coverage/doctor_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
**/Cargo.toml

📄 CodeRabbit inference engine (.agents/skills/prepare-code-freeze/SKILL.md)

Confirm or infer the target release version from upstream/main:Cargo.toml. Derive the release branch as release/<major>.<minor>.

Keep Rust package names and workspace metadata in Cargo.toml internally consistent across the project.

Files:

  • crates/core/Cargo.toml
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all TOML files using the # comment form.

Files:

  • crates/core/Cargo.toml
crates/core/src/api/{tool,llm}.rs

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Wire the new middleware chain into the execute path in crates/core/src/api/tool.rs or crates/core/src/api/llm.rs at the appropriate pipeline stage

Files:

  • crates/core/src/api/tool.rs
**/*.{md,rst,html,txt}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)

**/*.{md,rst,html,txt}: Always spell NVIDIA in all caps. Do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun because the name starts with an 'en' sound.
Do not add a registered trademark symbol after NVIDIA when referring to the company.
Use trademark symbols with product names only when the document type or legal guidance requires them.
Verify official capitalization, spacing, and hyphenation for product names.
Precede NVIDIA product names with NVIDIA on first mention when it is natural and accurate.
Do not rewrite product names for grammar or title-case rules.
Preserve third-party product names according to the owner's spelling.
Include the company name and full model qualifier on first use when it helps identify the model.
Preserve the official capitalization and punctuation of model names.
Use shorter family names only after the full name is established.
Spell out a term on first use and put the acronym in parentheses unless the acronym is widely understood by the intended audience.
Use the acronym on later mentions after it has been defined.
For long documents, reintroduce the full term if readers might lose context.
Form plurals of acronyms with s, not an apostrophe, such as GPUs.
In headings, common acronyms can remain abbreviated. Spell out the term in the first or second sentence of the body.
Common terms such as CPU, GPU, PC, API, and UI usually do not need to be spelled out for developer audiences.

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.{md,rst,html}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)

Link the first mention of a product name when the destination helps the reader.

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.{md,rst,txt}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)

Spell NVIDIA in all caps. Do not use Nvidia, nvidia, or NV.

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.{md,rst}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)

**/*.{md,rst}: Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text. Avoid raw URLs and weak anchors such as "here" or "read more."
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative steps. Keep steps parallel and split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once.
Prefer refer to over see when the wording points readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical docs.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values.
Use numerals for 10 or greater and include commas in thousands.
Do not add trademark symbols to learning-oriented docs unless the source, platform, or legal guidance explicitly requires them.

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.md

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-technical-docs.md)

**/*.md: Use title case consistently in technical documentation headings
Avoid quotation marks, ampersands, and exclamation marks in headings
Keep product, event, research, and whitepaper names in their official title case
Use title case for table headers
Do not force social-media sentence case into technical docs
Format code elements, commands, parameters, package names, and expressions in monospace
Format directories, file names, and paths in monospace using backticks
Use angle brackets inside monospace for variables inside paths, such as /home/<username>/.login
Format error messages and strings in quotation marks, keeping literal code strings in code formatting when clearer
Format UI buttons, menus, fields, and labels in bold
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use, sparingly and only when introducing the term
Use italics for publication titles
Format keyboard shortcuts in plain text, such as Press Ctrl+Alt+Delete
Use owner/repo link text for GitHub repositories, preferring [NVIDIA/NeMo](link) over prose references like 'the GitHub repo'
Introduce every code block with a complete sentence
Do not make a code block complete the grammar of the previous sentence
Do not continue a sentence after a code block
Use syntax highlighting when the format supports it for code blocks
Avoid the word 'snippet' unless the surrounding docs already use it as a term of art
Keep inline method, function, and class references consistent with nearby docs, omitting empty parentheses for prose readability when no call is shown
Use descriptive anchor text that matches the destination title when possible for links
Avoid raw URLs in running text
Avoid generic anchor text such as 'here,' 'this page,' and 'read more'
Include acronyms in link text when a linked term includes an acronym
Do not link long sentences or multiple sentences
Avoid links that pull readers away from a procedure unless the link is a p...

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Update README.md, fern/, package READMEs, and binding-support notes when public behavior, package names, examples, or supported bindings change.

**/*.{md,mdx}: Prefer the documented public API, not internal shortcuts
Keep package names, repo references, and build commands current
Keep release-process and release-notes guidance in repo-maintainer docs such as RELEASING.md, not as user-facing docs pages or CHANGELOG.md
Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work
When detailed dynamic plugin guides exist, keep Rust native plugin examples, Python worker plugin examples, and grpc-v1 protocol details on separate pages

If links in documentation change, run just docs-linkcheck.

Files:

  • integrations/coding-agents/claude-code/README.md
**/*.{md,markdown,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Markdown/MDX documentation files using the HTML comment block form.

Files:

  • integrations/coding-agents/claude-code/README.md
🔇 Additional comments (23)
crates/core/src/api/skill_load.rs (2)

169-181: Recursion on nested arrays still unbounded.

has_partial_read_controls was switched to the iterative visit_named_values, but collect_path_skill_names still recurses on Value::Array for path/paths fields. Since ToolCallParams.args is a public serde_json::Value, a deeply nested array (e.g. {"paths": [[[[...]]]]}) can still trigger a stack overflow — the same class of issue flagged previously on this exact function was only partially addressed.

🛡️ Proposed fix: bound recursion depth
-fn collect_path_skill_names(value: &Value, names: &mut Vec<String>) {
-    match value {
-        Value::String(path) => {
-            if let Some(name) = skill_name_from_path(path) {
-                names.push(name);
-            }
-        }
-        Value::Array(values) => values
-            .iter()
-            .for_each(|value| collect_path_skill_names(value, names)),
-        _ => {}
-    }
-}
+fn collect_path_skill_names(value: &Value, names: &mut Vec<String>) {
+    const MAX_DEPTH: usize = 8;
+    let mut stack = vec![(value, 0usize)];
+    while let Some((value, depth)) = stack.pop() {
+        match value {
+            Value::String(path) => {
+                if let Some(name) = skill_name_from_path(path) {
+                    names.push(name);
+                }
+            }
+            Value::Array(values) if depth < MAX_DEPTH => {
+                stack.extend(values.iter().map(|value| (value, depth + 1)));
+            }
+            _ => {}
+        }
+    }
+}

119-134: Boundary-matching fix confirmed.

Segment-based suffix matching now correctly rejects thread/spread/unread while still matching multi-segment tool names like mcp__filesystem__read_file. Resolves the previously flagged false-positive risk.

crates/core/Cargo.toml (1)

102-102: LGTM!

crates/core/src/api/mod.rs (1)

24-24: LGTM!

crates/core/src/api/tool.rs (2)

233-252: LGTM!


289-298: 🗄️ Data Integrity & Integration

No issue: the start event is not dropped here. sanitize_event only rewrites the event and returns None only if the global context read fails, so emitting the marks afterward does not break the parent-child chain.

			> Likely an incorrect or invalid review comment.
crates/cli/src/adapters/mod.rs (2)

8-10: LGTM!

Also applies to: 787-797


814-845: 🗄️ Data Integrity & Integration

No issue: event.metadata is always an object here. metadata() always returns agent_metadata(...), which builds a Map, and there are no adapter overrides in this path, so as_object_mut() cannot drop these markers.

			> Likely an incorrect or invalid review comment.
integrations/coding-agents/claude-code/README.md (1)

21-33: LGTM!

crates/core/tests/unit/atif_tests.rs (2)

2783-2811: Duplicate: this test still cannot validate ATIF mark filtering.

Because the event stream contains no matching tool End, export produces zero completed steps even if the mark is incorrectly retained. Add the End event and assert one step with no mark-derived data or metadata.

Source: Path instructions


111-111: LGTM!

Also applies to: 1499-1651

crates/core/tests/unit/skill_load_tests.rs (1)

1-297: LGTM!

crates/cli/src/installer.rs (1)

13-24: LGTM!

crates/cli/tests/coverage/session_tests.rs (1)

3388-3452: LGTM!

crates/cli/tests/coverage/doctor_tests.rs (1)

1628-1650: LGTM!

crates/core/tests/integration/api_surface_tests.rs (1)

341-389: LGTM!

Also applies to: 391-420, 421-463, 465-500, 502-571

integrations/coding-agents/claude-code/hooks/hooks.json (1)

25-35: LGTM!

crates/cli/src/session.rs (1)

26-26: LGTM! Past comment on extracting the skill_load_source/prompt_expansion literals into shared constants has been addressed here.

Also applies to: 954-966

crates/cli/tests/coverage/adapters_tests.rs (1)

51-103: LGTM! The negative-path assertion weakness flagged in a prior review has been fixed with the and_then(Value::as_str) comparison and the added hook_event_name payload check.

Also applies to: 105-133, 135-166

crates/cli/tests/coverage/installer_tests.rs (1)

78-87: LGTM!

crates/cli/src/doctor.rs (3)

433-438: LGTM! Status-combination and warning-message wiring are correct: combine_status preserves Fail, elevates to Warn when required, and the floor check only runs for a resolvable version.

Also applies to: 592-604


586-591: 🔒 Security & Privacy

2.1.116 is the correct floor for UserPromptExpansion.


606-614: 🎯 Functional Correctness

No parser change needed. The current major.minor.patch parsing matches the expected 2.1.206 (Claude Code)-style output, so this doesn’t introduce a false negative in the doctor check.

			> Likely an incorrect or invalid review comment.

Walkthrough

Adds skill-load detection from tool inputs and metadata, emits skill.load marks, infers skill loads from Claude UserPromptExpansion hooks, wires hook installation, and reports incompatible Claude Code versions.

Changes

Skill-load detection and marking

Layer / File(s) Summary
Core skill-load detection
crates/core/src/api/skill_load.rs, crates/core/src/api/mod.rs, crates/core/Cargo.toml, crates/core/tests/unit/skill_load_tests.rs
Detects skill names from skill tools, structured reads, and supported shell commands; parses precomputed metadata and deduplicates results.
Tool-call event emission
crates/core/src/api/tool.rs, crates/core/tests/integration/api_surface_tests.rs, crates/core/tests/unit/atif_tests.rs
Emits skill.load marks from handled, precomputed, or detected loads after tool-start events, while preserving sanitization and lifecycle behavior.
Prompt-expansion inference and hook wiring
crates/cli/src/adapters/mod.rs, crates/cli/src/session.rs, crates/cli/src/installer.rs, integrations/coding-agents/claude-code/hooks/hooks.json, crates/cli/tests/coverage/*
Converts valid UserPromptExpansion slash commands into inferred hook marks, emits skill.load.inferred, and installs the corresponding hook event.
Claude Code compatibility diagnostics
crates/cli/src/doctor.rs, crates/cli/tests/coverage/doctor_tests.rs, integrations/coding-agents/claude-code/README.md
Adds a version-floor warning for Claude Code installations that cannot accept the new hook event and documents the compatibility requirement.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ToolCaller
  participant ToolCall
  participant SkillLoadDetector
  participant EventSubscriber
  ToolCaller->>ToolCall: invoke tool
  ToolCall->>SkillLoadDetector: detect or parse precomputed loads
  SkillLoadDetector-->>ToolCall: skill-load entries
  ToolCall->>EventSubscriber: emit tool-start event
  ToolCall->>EventSubscriber: emit skill.load marks
Loading
sequenceDiagram
  participant ClaudeCode
  participant Adapter
  participant Session
  participant ATIFExporter
  ClaudeCode->>Adapter: UserPromptExpansion
  Adapter->>Adapter: infer slash-command skill load
  Adapter->>Session: HookMark with source metadata
  Session->>ATIFExporter: emit skill.load.inferred
Loading

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Title check ❌ Error The title is relevant and follows Conventional Commits, but the trailing stack tag makes the summary less clean than required. Remove the bracketed stack tag and keep the subject as a concise imperative summary, e.g. feat: emit automatic skill-load marks.
Docstring Coverage ⚠️ Warning Docstring coverage is 67.74% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required template sections and enough implementation detail, reviewer guidance, and issue linkage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@willkill07 willkill07 added this to the 0.6 milestone Jul 8, 2026
@willkill07 willkill07 self-assigned this Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/cli/src/session.rs`:
- Around line 953-965: Extract the "prompt_expansion" and "skill_load_source"
string literals into shared constants and use them in both
NormalizedEvent::HookMark handling in session.rs and inferred_skill_load_event
in adapters/mod.rs. Keep the comparison and metadata lookup wired through those
constants so both call sites stay in sync and future typos can’t silently fall
back to "hook_mark".

In `@crates/cli/tests/coverage/adapters_tests.rs`:
- Around line 132-156: The negative-path check in
does_not_infer_non_slash_or_empty_prompt_expansions is too weak because indexing
skill_load_source can silently return Null. Update the assertions on
claude_code::adapt’s HookMark branch to verify the metadata key is absent or not
equal to prompt_expansion, and also confirm the fallback plain hook_mark shape
by checking the event name/payload for the rejected UserPromptExpansion cases.

In `@crates/core/src/api/skill_load.rs`:
- Around line 236-345: The standalone command parsing in tokenize_simple_command
is hand-rolling shell quoting and escaping, which can miss edge cases. Replace
this custom tokenizer with a maintained shell-lexing approach or crate, then
keep complete_reader_paths, positional_paths, and powershell_content_paths using
the parsed tokens for the reader-safety heuristic. Make sure the new parsing
still preserves the current safe-rejection behavior for pipelines, subshells,
redirects, and other unsupported constructs.
- Around line 131-141: The structured-reader detection in is_structured_reader
is too permissive because it uses a bare suffix match after
normalize_identifier, which can misclassify unrelated tool names as readers.
Update the matching logic in is_structured_reader to follow the project’s real
naming boundary rules by checking token/segment boundaries on the original,
separator-preserved tool name rather than the fully concatenated identifier.
Keep the existing reader name set, but ensure only exact names or valid
namespaced forms are recognized, so tool names like thread or spread do not
trigger a skill.load mark.
- Around line 160-217: The recursive JSON walkers in has_partial_read_controls,
collect_path_skill_names, collect_named_strings, and collect_named_values should
not recurse indefinitely on deeply nested ToolCallParams.args. Replace the
recursive descent with an explicit stack/queue or add a bounded depth check so
nested Value::Object and Value::Array inputs cannot cause stack overflow. Keep
the existing normalization and traversal behavior in skill_load.rs while making
the traversal iterative and safe for maliciously nested tool args.

In `@crates/core/tests/unit/atif_tests.rs`:
- Around line 2628-2656: The test in AtifExporter is too weak because it only
proves no step is emitted when the tool scope is incomplete, not that
Event::Mark filtering works. Update
test_exporter_omits_skill_load_mark_from_atif_steps to drive a full tool
lifecycle with matching Start and End events, place the skill.load mark between
them, and use AtifExporter::subscriber() or the normal export path that
exercises the mark-filtering logic. Then assert exactly one step is produced and
verify the resulting step contains the tool scope data only, with no skill.load
mark data or metadata preserved.

In `@crates/core/tests/unit/skill_load_tests.rs`:
- Around line 1-294: The test suite in SkillLoad coverage is missing the
regression case for the reader-name false positive mentioned in skill_load.rs.
Add a negative test near the existing structured-reader assertions in
skill_load_tests.rs that exercises detect() with a tool name like "thread" and a
SKILL.md path, and assert it is rejected so the ends_with-based matching bug
stays fixed. Refer to detect and
assert_rejected/structured_readers_reject_non_skill_paths_missing_parents_and_non_read_tools
when adding the case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 3bb3aa60-3d1a-4f47-bf71-9bd0016704d7

📥 Commits

Reviewing files that changed from the base of the PR and between 29403a7 and 1f39d6d.

📒 Files selected for processing (14)
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/src/session.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/mod.rs
  • crates/core/src/api/skill_load.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • integrations/coding-agents/claude-code/hooks/hooks.json
  • integrations/coding-agents/codex/hooks/hooks.json
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: Check / Run
  • GitHub Check: Preview docs
🧰 Additional context used
📓 Path-based instructions (16)
**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*: Format changed files with the language-native formatter before the final lint/test pass.
If dynamic plugin behavior changed, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • integrations/coding-agents/codex/hooks/hooks.json
  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • integrations/coding-agents/claude-code/hooks/hooks.json
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
**

⚙️ CodeRabbit configuration file

**:

AGENTS.md

This file provides guidance to agents, including Claude Code and OpenAI Codex, when working in this repository.

Project Overview

NeMo Relay is a multi-language agent runtime framework for execution scopes, lifecycle events, middleware, plugins, and observability around tool and LLM calls. The core runtime is Rust. Primary supported bindings are Rust, Python, and Node.js. Go and the raw C FFI are experimental and source-first.

The shared runtime model is:

  1. Scope stacks decide where work belongs and which scope-local behavior is visible.
  2. Middleware registries decide what guardrails and intercepts run around managed calls.
  3. Plugins install reusable runtime behavior from configuration.
  4. Events record runtime behavior in ATOF form.
  5. Subscribers and exporters consume events in-process or export them to ATIF, OpenTelemetry, OpenInference, or other backends.

Repository Structure

The repository layout separates the Rust runtime, language bindings,
documentation, integrations, and agent-facing skills.

crates/
  core/       # Rust core runtime crate, published as nemo-relay
  adaptive/   # Adaptive runtime primitives and plugin components
  python/     # PyO3 native extension for the Python package
  ffi/        # Raw C ABI layer used by downstream bindings such as Go
  node/       # NAPI Node.js binding and JavaScript/TypeScript entry points
python/
  nemo_relay/  # Python wrapper package: scopes, tools, LLM, middleware, typed helpers, plugins, adaptive helpers
  tests/      # Python tests
go/
  nemo_relay/  # Experimental Go CGo binding and tests
fern/         # Fern documentation site
scripts/      # Stable wrappers and helper scripts; build/test/docs entry points live in justfile
skills/       # Published Codex/agent skills for NeMo Relay usage patterns

Prerequisites

Insta...

Files:

  • integrations/coding-agents/codex/hooks/hooks.json
  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • integrations/coding-agents/claude-code/hooks/hooks.json
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.rs

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

**/*.rs: Any Rust change must run just test-rust
Any Rust change must run cargo fmt --all
Any Rust change must run cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all for all FFI work since it is Rust work
Run just test-rust to validate FFI changes
Run cargo clippy --workspace --all-targets -- -D warnings to enforce strict linting on FFI work

When Rust files changed as part of Go work, also run cargo fmt --all, just test-rust, and cargo clippy --workspace --all-targets -- -D warnings

**/*.rs: Run cargo fmt --all when Rust files are changed as part of Node work
Run cargo clippy --workspace --all-targets -- -D warnings when Rust files are changed as part of Node work
Run just test-rust when Rust files are changed as part of Node work

When changing the core Rust runtime or Rust-facing API surface, format Rust code with cargo fmt (rustfmt defaults), keep cargo clippy -- -D warnings clean, and satisfy cargo deny check per deny.toml.

**/*.rs: If any Rust code changed, always run just test-rust.
If any Rust code changed, also run cargo fmt --all.
If any Rust code changed, also run cargo clippy --workspace --all-targets -- -D warnings.
For Rust changes headed for review, run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings even if relying on pre-commit.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
{crates/core,crates/adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/prepare-pr/SKILL.md)

Changes to crates/core or crates/adaptive must run the full language matrix

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/src/api/skill_load.rs
crates/core/**/*.rs

📄 CodeRabbit inference engine (.agents/skills/test-go-binding/SKILL.md)

If the change touched crates/core or shared runtime semantics, also use validate-change for broader validation

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions in Rust and Python: use snake_case.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,py,js,mjs,cjs,ts,tsx}: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths, and keep errors explicit and binding-appropriate at the wrapper layer.
Keep async behavior on the existing tokio-based model; bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use language-appropriate naming conventions: Rust snake_case, C FFI exports prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,go,js,ts}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Rust, Go, JavaScript, and TypeScript source files using the corresponding // comment form.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
crates/core/src/{api/**/*.rs,api/runtime/**/*.rs,codec/**/*.rs,json.rs}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Implement the new or changed public runtime behavior first in the Rust core, especially under crates/core/src/api/ and related core modules such as crates/core/src/api/runtime/, crates/core/src/codec/, and crates/core/src/json.rs.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/src/api/tool.rs
  • crates/core/src/api/skill_load.rs
{crates/**/src/**/*.rs,python/**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Do not add tests under src; Rust tests belong in crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/core/src/api/tool.rs
  • crates/core/src/api/skill_load.rs
crates/{core,adaptive}/**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If crates/core or crates/adaptive changed, run the full validation matrix across Rust, Python, Go, and Node.js.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/src/api/skill_load.rs
**/*.{rs,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If a language surface changed, always run that language's test target even when Rust core did not change.

Files:

  • crates/core/src/api/mod.rs
  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/src/session.rs
  • crates/cli/src/adapters/mod.rs
  • crates/cli/src/installer.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
  • crates/core/src/api/skill_load.rs
crates/{core,adaptive}/**/*.rs

⚙️ CodeRabbit configuration file

crates/{core,adaptive}/**/*.rs: Review the Rust runtime for async correctness, scope isolation, middleware ordering, and event lifecycle regressions.
Pay close attention to task-local/thread-local scope propagation, callback lifetimes, stream finalization, and root_uuid isolation.
Public API changes should preserve existing behavior unless tests and docs show the intended migration path.

Files:

  • crates/core/src/api/mod.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/core/src/api/tool.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/core/src/api/skill_load.rs
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • crates/cli/tests/coverage/installer_tests.rs
  • crates/core/tests/unit/atif_tests.rs
  • crates/cli/tests/coverage/session_tests.rs
  • crates/core/tests/integration/api_surface_tests.rs
  • crates/core/tests/unit/skill_load_tests.rs
  • crates/cli/tests/coverage/adapters_tests.rs
crates/core/src/api/{tool,llm}.rs

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Wire the new middleware chain into the execute path in crates/core/src/api/tool.rs or crates/core/src/api/llm.rs at the appropriate pipeline stage

Files:

  • crates/core/src/api/tool.rs
🔇 Additional comments (12)
crates/core/src/api/tool.rs (2)

17-17: LGTM!

Also applies to: 233-252


268-298: 🗄️ Data Integrity & Integration

No change needed: orphaned skill.load marks are tolerated
skill.load marks can remain when the tool start event is sanitized away, and the observability exporters already treat missing parents as orphan marks rather than invalid data.

			> Likely an incorrect or invalid review comment.
crates/core/tests/integration/api_surface_tests.rs (1)

341-571: LGTM!

crates/core/src/api/mod.rs (1)

22-22: LGTM!

crates/cli/src/adapters/mod.rs (1)

784-794: 🎯 Functional Correctness

Verify Codex emits matching expansion_type/command_name fields.

installer.rs now wires UserPromptExpansion into both Claude Code and Codex hook configs, but inferred_skill_load_event only demonstrates coverage against Claude-shaped payloads (expansion_type: "slash_command", command_name). If Codex's UserPromptExpansion hook payload uses different field names/values, this inference silently falls through to a generic hook_mark for Codex without any test coverage confirming that path is exercised or acceptable.

As per PR objectives, this PR intends to normalize "hook behavior for Claude Code, Codex, and Hermes, including inferred slash-command expansion marks" — please confirm Codex payload shape parity.

Also applies to: 811-840

crates/cli/src/installer.rs (1)

18-33: LGTM!

crates/cli/tests/coverage/adapters_tests.rs (1)

51-130: LGTM!

crates/cli/tests/coverage/installer_tests.rs (1)

81-87: LGTM!

crates/cli/tests/coverage/session_tests.rs (1)

3388-3453: LGTM!

integrations/coding-agents/claude-code/hooks/hooks.json (1)

25-35: LGTM!

integrations/coding-agents/codex/hooks/hooks.json (1)

26-36: LGTM!

crates/cli/src/session.rs (1)

953-965: 🎯 Functional Correctness

ATIF already skips all Mark events
skill.load.inferred won't surface as an ATIF step; the exporter filters marks generically, not by the literal skill.load name.

			> Likely an incorrect or invalid review comment.

Comment thread crates/cli/src/session.rs
Comment thread crates/cli/tests/coverage/adapters_tests.rs
Comment thread crates/core/src/api/skill_load.rs
Comment thread crates/core/src/api/skill_load.rs
Comment thread crates/core/src/api/skill_load.rs Outdated
Comment thread crates/core/tests/unit/atif_tests.rs
Comment thread crates/core/tests/unit/skill_load_tests.rs

@zhongxuanwang-nv zhongxuanwang-nv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitty things, thanks Will!

Comment thread crates/cli/src/installer.rs
Comment thread crates/core/src/api/tool.rs
Comment thread crates/core/src/api/skill_load.rs Outdated
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

License Diff

Compared against origin/main.

License diff failed with exit code 1; this informational check does not block CI.

No license diff output was produced.

Status output
[license-diff] selected languages: rust, node, python
[license-diff] generating current inventory
[license-diff] current: generating Rust inventory
[license-diff] current: Rust inventory complete (378 packages)
[license-diff] current: generating Node inventory
[license-diff] current: Node inventory complete (363 packages)
[license-diff] current: generating Python inventory
[license-diff] current: Python inventory complete (105 packages)
[license-diff] current inventory complete
[license-diff] checking out base ref origin/main into a temporary worktree
[license-diff] base: generating Rust inventory
[license-diff] base: Rust inventory complete (378 packages)
[license-diff] base: generating Node inventory
[license-diff] base: Node inventory complete (363 packages)
[license-diff] base: generating Python inventory
[license-diff] removing temporary base worktree
Traceback (most recent call last):
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 1303, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 1349, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 1298, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 1058, in _send_output
    self.send(msg)
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 996, in send
    self.connect()
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/http/client.py", line 1475, in connect
    self.sock = self._context.wrap_socket(self.sock,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/ssl.py", line 1104, in _create
    self.do_handshake()
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/ssl.py", line 1382, in do_handshake
    self._sslobj.do_handshake()
TimeoutError: _ssl.c:999: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/license_diff.py", line 328, in <module>
    raise SystemExit(main())
                     ^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/license_diff.py", line 308, in main
    base_inventory = _worktree_inventory(args.root, args.base_ref or "HEAD", languages)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/license_diff.py", line 238, in _worktree_inventory
    inventory = generate_inventory(worktree, languages, label="base")
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/license_diff.py", line 74, in generate_inventory
    inventory[language] = attributions_lockfile_md._python_license_inventory()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/attributions_lockfile_md.py", line 879, in _python_license_inventory
    _rendered_python_package_inventory(pkg) for pkg in _lockfile_python_packages(lockfile_pkgs, own_name=own_name)
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/attributions_lockfile_md.py", line 861, in _lockfile_python_packages
    packages.append(_lockfile_only_python_package(pkg))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/attributions_lockfile_md.py", line 839, in _lockfile_only_python_package
    license_name, license_texts = _artifact_metadata_from_lockfile(pkg)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/attributions_lockfile_md.py", line 793, in _artifact_metadata_from_lockfile
    data = _download_locked_artifact(sdist["url"], sdist["hash"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/NeMo-Relay/NeMo-Relay/scripts/licensing/attributions_lockfile_md.py", line 530, in _download_locked_artifact
    with urllib.request.urlopen(url, timeout=10) as response:  # noqa: S310
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/_temp/uv-python-dir/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error _ssl.c:999: The handshake operation timed out>

willkill07 and others added 4 commits July 10, 2026 18:01
Signed-off-by: Will Killian <wkillian@nvidia.com>
UserPromptExpansion is only present in Claude Code's plugin hook
whitelist from 2.1.116. Older hosts reject the entire plugin hooks
file on the unknown event name and silently load no relay hooks,
for both the transparent-run temp plugin and the marketplace plugin.

Document the verified floor on HOOK_EVENTS, make doctor warn when the
probed Claude Code predates it, and state the requirement in the
plugin README.

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
(cherry picked from commit d3b8959)
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Comment thread crates/core/tests/unit/atif_tests.rs
Comment thread crates/core/src/api/tool.rs
@willkill07

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit a6cb3f4 into NVIDIA:main Jul 10, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature a new feature lang:rust PR changes/introduces Rust code size:XL PR is extra large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants